package com.qingdai.emuns;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.*;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 商品
 * </p>
 *
 * @author LiuZiMing
 * @since 2024-01-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("order__order")
@Document(indexName="order")
@Schema(description = "订单")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @Field(type = FieldType.Integer)
    @Schema(description = "id")
    private Integer id;

    @TableField("deliver_address_id")
    @Field(type = FieldType.Integer)
    @Schema(description = "收货地址id")
    private Integer deliverAddressId;

    @TableField("shop_id")
    @Field(type = FieldType.Integer)
    @Schema(description = "店铺id")
    private Integer shopId;

    @TableField("buyer_id")
    @Field(type = FieldType.Integer)
    @Schema(description = "买家id")
    private Integer buyerId;

    @TableField("commodity_id_list")
    @Field(type = FieldType.Text)
    @Schema(description = "商品id集合")
    private String commodityIdList;

    @TableField("commodity_number_list")
    @Field(type = FieldType.Text)
    @Schema(description = "商品数量集合")
    private String commodityNumberList;

    @TableField("creation_time")
    @Field(type = FieldType.Text)
    @Schema(description = "订单创建时间")
    private String creationTime;

    @TableField("payment_time")
    @Field(type = FieldType.Text)
    @Schema(description = "订单支付时间")
    private String paymentTime;

    @TableField("send_time")
    @Field(type = FieldType.Text)
    @Schema(description = "订单发货时间")
    private String sendTime;
}
